package cn.iocoder.yudao.module.xkfz.mapper.excel;

import cn.iocoder.yudao.framework.common.pojo.PageResult;
import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX;
import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX;

import cn.iocoder.yudao.module.xkfz.domain.excel.entity.AchievementAward;
import cn.iocoder.yudao.module.xkfz.domain.excel.entity.GuidelinesAndConsensus;
import cn.iocoder.yudao.module.xkfz.domain.excel.po.GuidelinesAndConsensusPo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.Arrays;
import java.util.List;

/**
 * @Description TODO
 * @Author ZWC
 * @Date 2024/5/14 15:58
 */
@Mapper
public interface GuidelinesAndConsensusMapper extends BaseMapperX<GuidelinesAndConsensus> {


    default PageResult<GuidelinesAndConsensus> selectPage (GuidelinesAndConsensusPo reqPo) {
        return selectPage(reqPo, new LambdaQueryWrapperX<GuidelinesAndConsensus>()
                .likeIfPresent(GuidelinesAndConsensus::getPublishYear, reqPo.getPeriodTime())
                .eqIfPresent(GuidelinesAndConsensus::getDeptName, reqPo.getDeptName())
                .orderByDesc(Arrays.asList(GuidelinesAndConsensus::getUpdateTime)));
    }

}
